package com.shaozi.nc.quartz.base;

import org.springframework.beans.factory.annotation.Value;

import com.shaozi.nc.core.Consts;
import com.shaozi.utils.date.DateHelper;

public abstract class BaseRuleJobExecute extends BaseCompanyJobExecute {

	@Value("${attendance.alarm.start.diff.min:10}")
	private int startDiffMin;

	public BaseRuleJobExecute() {

	}

	public long withStartAt(String time, int attendanceType) {
		return DateHelper.withStartAt(time, Consts.Attendance.Type_Out, attendanceType, startDiffMin);
	}
	
	public long withStartAt(long time) {
		return DateHelper.withStartAt(time);
	}

	public int getStartDiffMin() {
		return startDiffMin;
	}

	public void setStartDiffMin(int startDiffMin) {
		this.startDiffMin = startDiffMin;
	}

}
